/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package queenb.net.entitybean;

import java.io.Serializable;
import java.sql.Date;
import oracle.jdbc.OracleTypes;
import queenb.net.annotation.Mapping;
import queenb.net.datacontrol.DataControl;
import queenb.web.store.V050Store;
import queenb.web.util.Util;

/**
 *
 * @author VANANH
 */
public class V050 extends DataControl<V050> implements Serializable {

    @Mapping(name = "fv050", typeMapping = OracleTypes.INTEGER)
    private int fv050;
    @Mapping(name = "pv050", typeMapping = OracleTypes.INTEGER)
    private int pv050;
    @Mapping(name = "vv051", typeMapping = OracleTypes.CHAR)
    private String vv051;
    @Mapping(name = "vv052", typeMapping = OracleTypes.CHAR)
    private String vv052;
    @Mapping(name = "vv066", typeMapping = OracleTypes.CHAR)
    private String vv066;
    @Mapping(name = "vv065", typeMapping = OracleTypes.CHAR)
    private String vv065;
    @Mapping(name = "vv069", typeMapping = OracleTypes.CHAR)
    private String vv069;
    @Mapping(name = "vv070", typeMapping = OracleTypes.CHAR)
    private String vv070;
    @Mapping(name = "vv071", typeMapping = OracleTypes.CHAR)
    private String vv071;
    @Mapping(name = "vv067", typeMapping = OracleTypes.CHAR)
    private String vv067;
    @Mapping(name = "vn072", typeMapping = OracleTypes.INTEGER)
    private int vn072;
    @Mapping(name = "vn075", typeMapping = OracleTypes.INTEGER)
    private int vn075;
    @Mapping(name = "vn076", typeMapping = OracleTypes.INTEGER)
    private int vn076;
    @Mapping(name = "vn077", typeMapping = OracleTypes.INTEGER)
    private int vn077;
    @Mapping(name = "vn078", typeMapping = OracleTypes.INTEGER)
    private int vn078;
    @Mapping(name = "vn079", typeMapping = OracleTypes.INTEGER)
    private int vn079;
    @Mapping(name = "vn053", typeMapping = OracleTypes.INTEGER)
    private int vn053;
    @Mapping(name = "vn054", typeMapping = OracleTypes.INTEGER)
    private int vn054;
    @Mapping(name = "vn055", typeMapping = OracleTypes.INTEGER)
    private int vn055;// -- PAX, FOC, Gia ban
    @Mapping(name = "vn056", typeMapping = OracleTypes.INTEGER)
    private int vn056;
    @Mapping(name = "vn057", typeMapping = OracleTypes.INTEGER)
    private int vn057;
    @Mapping(name = "vn058", typeMapping = OracleTypes.INTEGER)
    private int vn058;
    @Mapping(name = "vn059", typeMapping = OracleTypes.INTEGER)
    private int vn059;
    @Mapping(name = "vn060", typeMapping = OracleTypes.INTEGER)
    private int vn060;
    @Mapping(name = "vn061", typeMapping = OracleTypes.INTEGER)
    private int vn061;
    @Mapping(name = "vn062", typeMapping = OracleTypes.INTEGER)
    private int vn062;
    @Mapping(name = "vn063", typeMapping = OracleTypes.INTEGER)
    private int vn063;
    @Mapping(name = "vn064", typeMapping = OracleTypes.INTEGER)
    private int vn064;
    @Mapping(name = "vl098", typeMapping = OracleTypes.CHAR)
    private String vl098;//
     @Mapping(name = "vl098", typeMapping = OracleTypes.DATE)
    private Date vl0981;//
    @Mapping(name = "vl099", typeMapping = OracleTypes.CHAR)
    private String vl099;//
     @Mapping(name = "vl097", typeMapping = OracleTypes.CHAR)
    private String vl097;//
    @Mapping(name = "count", typeMapping = OracleTypes.INTEGER)
    private int count;
    @Mapping(name = "paystatus", typeMapping = OracleTypes.INTEGER)
    private int paystatus;
    @Mapping(name = "val", typeMapping = OracleTypes.INTEGER)
    private int val;
    @Mapping(name = "label", typeMapping = OracleTypes.CHAR)
    private String label;
    @Mapping(name = "vd073", typeMapping = OracleTypes.DATE)
    private Date vd073;
    @Mapping(name = "vd074", typeMapping = OracleTypes.DATE)
    private Date vd074;
    @Mapping(name = "FA000F", typeMapping = OracleTypes.INTEGER)
    private int fa000f;
    @Mapping(name = "FA000T", typeMapping = OracleTypes.INTEGER)
    private int fa000t;
    @Mapping(name = "AV001F", typeMapping = OracleTypes.CHAR)
    private String av001f;
    @Mapping(name = "AV001T", typeMapping = OracleTypes.CHAR)
    private String av001t;
    @Mapping(name = "KV103", typeMapping = OracleTypes.CHAR)
    private String kv103;
    @Mapping(name = "FK100", typeMapping = OracleTypes.INTEGER)
    private int fk100;
    @Mapping(name = "KN114", typeMapping = OracleTypes.INTEGER)
    private int kn114;
    @Mapping(name = "FS400", typeMapping = OracleTypes.INTEGER)
    private int FS400;
    @Mapping(name = "FN750", typeMapping = OracleTypes.INTEGER)
    private int fn750;
     @Mapping(name = "ROWSS", typeMapping = OracleTypes.INTEGER)
    private int rowss;
      @Mapping(name = "fc475", typeMapping = OracleTypes.INTEGER)
    private int fc475;;
    private boolean checknote;// shownote
    private boolean checknote1;// shownote
    private String subKv103;
    //PAYSTATUS
//     @Mapping(name = "val", typeMapping = OracleTypes.INTEGER)
//    private int val;
//    @Mapping(name = "label", typeMapping = OracleTypes.CHAR)
//    private String label;
    private String demo;
    private String vn055st;
    private boolean checkTour;
    private int socho;//so cho con lại
    /**
     * @return the fv050
     */
    public int getFv050() {
        return fv050;
    }

    /**
     * @param fv050 the fv050 to set
     */
    public void setFv050(int fv050) {
        this.fv050 = fv050;
    }

    /**
     * @return the vv051
     */
    public String getVv051() {
        return vv051;
    }

    /**
     * @param vv051 the vv051 to set
     */
    public void setVv051(String vv051) {
        this.vv051 = vv051;
    }

    /**
     * @return the vv052
     */
    public String getVv052() {
        return vv052;
    }

    /**
     * @param vv052 the vv052 to set
     */
    public void setVv052(String vv052) {
        this.vv052 = vv052;
    }

    /**
     * @return the vn053
     */
    public int getVn053() {
        return vn053;
    }

    /**
     * @param vn053 the vn053 to set
     */
    public void setVn053(int vn053) {
        this.vn053 = vn053;
    }

    /**
     * @return the vn054
     */
    public int getVn054() {
        return vn054;
    }

    /**
     * @param vn054 the vn054 to set
     */
    public void setVn054(int vn054) {
        this.vn054 = vn054;
    }

    /**
     * @return the vn055
     */
    public int getVn055() {
        return vn055;
    }

    /**
     * @param vn055 the vn055 to set
     */
    public void setVn055(int vn055) {
        this.vn055 = vn055;
    }

    /**
     * @return the vn056
     */
    public int getVn056() {
        return vn056;
    }

    /**
     * @param vn056 the vn056 to set
     */
    public void setVn056(int vn056) {
        this.vn056 = vn056;
    }

    /**
     * @return the vn057
     */
    public int getVn057() {
        return vn057;
    }

    /**
     * @param vn057 the vn057 to set
     */
    public void setVn057(int vn057) {
        this.vn057 = vn057;
    }

    /**
     * @return the vn058
     */
    public int getVn058() {
        return vn058;
    }

    /**
     * @param vn058 the vn058 to set
     */
    public void setVn058(int vn058) {
        this.vn058 = vn058;
    }

    /**
     * @return the vn059
     */
    public int getVn059() {
        return vn059;
    }

    /**
     * @param vn059 the vn059 to set
     */
    public void setVn059(int vn059) {
        this.vn059 = vn059;
    }

    /**
     * @return the vn060
     */
    public int getVn060() {
        return vn060;
    }

    /**
     * @param vn060 the vn060 to set
     */
    public void setVn060(int vn060) {
        this.vn060 = vn060;
    }

    /**
     * @return the vn061
     */
    public int getVn061() {
        return vn061;
    }

    /**
     * @param vn061 the vn061 to set
     */
    public void setVn061(int vn061) {
        this.vn061 = vn061;
    }

    /**
     * @return the vn062
     */
    public int getVn062() {
        return vn062;
    }

    /**
     * @param vn062 the vn062 to set
     */
    public void setVn062(int vn062) {
        this.vn062 = vn062;
    }

    /**
     * @return the vn063
     */
    public int getVn063() {
        return vn063;
    }

    /**
     * @param vn063 the vn063 to set
     */
    public void setVn063(int vn063) {
        this.vn063 = vn063;
    }

    /**
     * @return the vn064
     */
    public int getVn064() {
        return vn064;
    }

    /**
     * @param vn064 the vn064 to set
     */
    public void setVn064(int vn064) {
        this.vn064 = vn064;
    }

    /**
     * @return the vv066
     */
    public String getVv066() {
        return vv066;
    }

    /**
     * @param vv066 the vv066 to set
     */
    public void setVv066(String vv066) {
        this.vv066 = vv066;
    }

    /**
     * @return the vv065
     */
    public String getVv065() {
        return vv065;
    }

    /**
     * @param vv065 the vv065 to set
     */
    public void setVv065(String vv065) {
        this.vv065 = vv065;
    }

    /**
     * @return the demo
     */
    public String getDemo() {
        try {
            if (getVv065().equals("OP")) {
                demo = "Tour mới tạo";
            } else if (getVv065().equals("CV")) {
                demo = "Xây dựng Tour";
            } else if (getVv065().equals("BT")) {
                demo = "Xây dựng chiết tính";
            } else if (getVv065().equals("OF")) {
                demo = "Báo giá Tour";
            } else if (getVv065().equals("WA")) {
                demo = "Đợi KH phản hồi (lần 1)";
            } else if (getVv065().equals("AI")) {
                demo = "Đợi KH phản hồi (lần 2)";
            } else if (getVv065().equals("IT")) {
                demo = "Đợi KH phản hồi (lần 3)";
            } else if (getVv065().equals("BO")) {
                demo = "KH đã book tour";
            } else if (getVv065().equals("MB")) {
                demo = "KH từ chối book tour";
            } else if (getVv065().equals("TB")) {
                demo = "Tổ chức tour";
            } else if (getVv065().equals("ET")) {
                demo = "Tour kết thúc";
            }
        } catch (Exception e) {
            demo = "";
        }
        return demo;
    }

    /**
     * @param demo the demo to set
     */
    public void setDemo(String demo) {
        this.demo = demo;
    }

    /**
     * @return the val
     */
//    public int getVal() {
//        return val;
//    }
//
//    /**
//     * @param val the val to set
//     */
//    public void setVal(int val) {
//        this.val = val;
//    }
//
//    /**
//     * @return the label
//     */
//    public String getLabel() {
//        return label;
//    }
//
//    /**
//     * @param label the label to set
//     */
//    public void setLabel(String label) {
//        this.label = label;
//    }
    /**
     * @return the vv069
     */
    public String getVv069() {
        return vv069;
    }

    /**
     * @param vv069 the vv069 to set
     */
    public void setVv069(String vv069) {
        this.vv069 = vv069;
    }

    /**
     * @return the vv070
     */
    public String getVv070() {
        return vv070;
    }

    /**
     * @param vv070 the vv070 to set
     */
    public void setVv070(String vv070) {
        this.vv070 = vv070;
    }

    /**
     * @return the pv050
     */
    public int getPv050() {
        return pv050;
    }

    /**
     * @param pv050 the pv050 to set
     */
    public void setPv050(int pv050) {
        this.pv050 = pv050;
    }

    /**
     * @return the vv071
     */
    public String getVv071() {
        return vv071;
    }

    /**
     * @param vv071 the vv071 to set
     */
    public void setVv071(String vv071) {
        this.vv071 = vv071;
    }

    /**
     * @return the vl098
     */
    public String getVl098() {
        return vl098;
    }

    /**
     * @param vl098 the vl098 to set
     */
    public void setVl098(String vl098) {
        this.vl098 = vl098;
    }

    /**
     * @return the vl099
     */
    public String getVl099() {
        return vl099;
    }

    /**
     * @param vl099 the vl099 to set
     */
    public void setVl099(String vl099) {
        this.vl099 = vl099;
    }

    /**
     * @return the vn072
     */
    public int getVn072() {
        return vn072;
    }

    /**
     * @param vn072 the vn072 to set
     */
    public void setVn072(int vn072) {
        this.vn072 = vn072;
    }

    /**
     * @return the count
     */
    public int getCount() {
        return count;
    }

    /**
     * @param count the count to set
     */
    public void setCount(int count) {
        this.count = count;
    }

    /**
     * @return the vn055st
     */
    public String getVn055st() {

        double tn951db = Util.convertStringToDouble(String.valueOf(vn055));
        vn055st = Util.numberformater(tn951db, "##,###,###");
      
        return vn055st;
    }

    /**
     * @param vn055st the vn055st to set
     */
    public void setVn055st(String vn055st) {
        this.vn055st = vn055st;
    }

    /**
     * @return the paystatus
     */
    public int getPaystatus() {
        return paystatus;
    }

    /**
     * @param paystatus the paystatus to set
     */
    public void setPaystatus(int paystatus) {
        this.paystatus = paystatus;
    }

    /**
     * @return the val
     */
    public int getVal() {
        return val;
    }

    /**
     * @param val the val to set
     */
    public void setVal(int val) {
        this.val = val;
    }

    /**
     * @return the label
     */
    public String getLabel() {
        return label;
    }

    /**
     * @param label the label to set
     */
    public void setLabel(String label) {
        this.label = label;
    }

    /**
     * @return the vd073
     */
    public Date getVd073() {
        return vd073;
    }

    /**
     * @param vd073 the vd073 to set
     */
    public void setVd073(Date vd073) {
        this.vd073 = vd073;
    }

    /**
     * @return the vd074
     */
    public Date getVd074() {
        return vd074;
    }

    /**
     * @param vd074 the vd074 to set
     */
    public void setVd074(Date vd074) {
        this.vd074 = vd074;
    }

    /**
     * @return the vn075
     */
    public int getVn075() {
        return vn075;
    }

    /**
     * @param vn075 the vn075 to set
     */
    public void setVn075(int vn075) {
        this.vn075 = vn075;
    }

    /**
     * @return the vn076
     */
    public int getVn076() {
        return vn076;
    }

    /**
     * @param vn076 the vn076 to set
     */
    public void setVn076(int vn076) {
        this.vn076 = vn076;
    }

    /**
     * @return the vn077
     */
    public int getVn077() {
        return vn077;
    }

    /**
     * @param vn077 the vn077 to set
     */
    public void setVn077(int vn077) {
        this.vn077 = vn077;
    }

    /**
     * @return the vn078
     */
    public int getVn078() {
        return vn078;
    }

    /**
     * @param vn078 the vn078 to set
     */
    public void setVn078(int vn078) {
        this.vn078 = vn078;
    }

    /**
     * @return the fa000f
     */
    public int getFa000f() {
        return fa000f;
    }

    /**
     * @param fa000f the fa000f to set
     */
    public void setFa000f(int fa000f) {
        this.fa000f = fa000f;
    }

    /**
     * @return the fa000t
     */
    public int getFa000t() {
        return fa000t;
    }

    /**
     * @param fa000t the fa000t to set
     */
    public void setFa000t(int fa000t) {
        this.fa000t = fa000t;
    }

    /**
     * @return the av001f
     */
    public String getAv001f() {
        return av001f;
    }

    /**
     * @param av001f the av001f to set
     */
    public void setAv001f(String av001f) {
        this.av001f = av001f;
    }

    /**
     * @return the av001t
     */
    public String getAv001t() {
        return av001t;
    }

    /**
     * @param av001t the av001t to set
     */
    public void setAv001t(String av001t) {
        this.av001t = av001t;
    }

    /**
     * @return the vn079
     */
    public int getVn079() {
        return vn079;
    }

    /**
     * @param vn079 the vn079 to set
     */
    public void setVn079(int vn079) {
        this.vn079 = vn079;
    }

    /**
     * @return the kv103
     */
    public String getKv103() {
        return kv103;
    }

    /**
     * @param kv103 the kv103 to set
     */
    public void setKv103(String kv103) {
        this.kv103 = kv103;
    }

    /**
     * @return the fk100
     */
    public int getFk100() {
        return fk100;
    }

    /**
     * @param fk100 the fk100 to set
     */
    public void setFk100(int fk100) {
        this.fk100 = fk100;
    }

    /**
     * @return the kn114
     */
    public int getKn114() {
        return kn114;
    }

    /**
     * @param kn114 the kn114 to set
     */
    public void setKn114(int kn114) {
        this.kn114 = kn114;
    }

    /**
     * @return the checkTour
     */
    public boolean isCheckTour() {
      
        if (getVv065() == null) {
            checkTour = true;
        } else {
            checkTour = false;
        }
        return checkTour;
    }

    /**
     * @param checkTour the checkTour to set
     */
    public void setCheckTour(boolean checkTour) {
        this.checkTour = checkTour;
    }

    /**
     * @return the checknote
     */
    public boolean isChecknote() {
        if (getVv071().equals("") || getVv071() != null) {
            checknote = true;
        } else {
            checknote = false;
        }
        return checknote;
    }

    /**
     * @param checknote the checknote to set
     */
    public void setChecknote(boolean checknote) {
        this.checknote = checknote;
    }

    /**
     * @return the checknote1
     */
    public boolean isChecknote1() {
        
     //   System.err.println("------------------------AAAAAAAAA___________"+ getVv071());
        if (vv071 != null) {
            if (getVv071().length() > 0) {
                 checknote1 = true;
            }
            // checknote1 = true;
        }  
       
    
    return checknote1 ;
}
/**
 * @param checknote1 the checknote1 to set
 */
public void setChecknote1(boolean checknote1) {
        this.checknote1 = checknote1;
    }

    /**
     * @return the FS400
     */
    public int getFS400() {
        return FS400;
    }

    /**
     * @param FS400 the FS400 to set
     */
    public void setFS400(int FS400) {
        this.FS400 = FS400;
    }

    /**
     * @return the vl097
     */
    public String getVl097() {
        return vl097;
    }

    /**
     * @param vl097 the vl097 to set
     */
    public void setVl097(String vl097) {
        this.vl097 = vl097;
    }

    /**
     * @return the subKv103
     */
    public String getSubKv103() {
         if(kv103!=null){
            if(kv103.length()> 25){
            subKv103 = kv103.substring(0,25)+"...";
           
        }else{
            subKv103 = getKv103();
        }
        }
        return subKv103;
    }

    /**
     * @param subKv103 the subKv103 to set
     */
    public void setSubKv103(String subKv103) {
        this.subKv103 = subKv103;
    }

    /**
     * @return the fn750
     */
    public int getFn750() {
        return fn750;
    }

    /**
     * @param fn750 the fn750 to set
     */
    public void setFn750(int fn750) {
        this.fn750 = fn750;
    }

    /**
     * @return the vl0981
     */
    public Date getVl0981() {
        return vl0981;
    }

    /**
     * @param vl0981 the vl0981 to set
     */
    public void setVl0981(Date vl0981) {
        this.vl0981 = vl0981;
    }

    /**
     * @return the rowss
     */
    public int getRowss() {
        return rowss;
    }

    /**
     * @param rowss the rowss to set
     */
    public void setRowss(int rowss) {
        this.rowss = rowss;
    }

    /**
     * @return the fc475
     */
    public int getFc475() {
        return fc475;
    }

    /**
     * @param fc475 the fc475 to set
     */
    public void setFc475(int fc475) {
        this.fc475 = fc475;
    }

    /**
     * @return the vv067
     */
    public String getVv067() {
        return vv067;
    }

    /**
     * @param vv067 the vv067 to set
     */
    public void setVv067(String vv067) {
        this.vv067 = vv067;
    }

    /**
     * @return the socho
     */
    public int getSocho() {
        if(getVn053()==0){
        socho=0;
        }else if(vn053>=getCount()){
            socho = getVn053()-getCount();
        }else{
            socho =0;
        }
        return socho;
    }

    /**
     * @param socho the socho to set
     */
    public void setSocho(int socho) {
        this.socho = socho;
    }
    /**
     * @return the countcus
     */
}
